package cn.itcast.bos.service.base;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service;

import cn.itcast.bos.dao.base.IcourierDao;
import cn.itcast.bos.domain.base.Courier;

@Service
public class CourierServiceImp implements IcourierService {
	@Autowired
	private IcourierDao IcourierDao;

	@Override
	public void save(Courier courier) {
		// TODO Auto-generated method stub
		IcourierDao.save(courier);
	
	}

	@Override
	public Page<Courier> findAll(Pageable pageable) {
		// TODO Auto-generated method stub
	return	IcourierDao.findAll(pageable);
	}

	@Override
	public Page<Courier> findAll(Specification<Courier> specification, Pageable pageable) {
		// TODO Auto-generated method stub
		Page<Courier> findAll = IcourierDao.findAll(specification,pageable);
		return findAll;
	}


}
